using System.Xml.Linq;
using Calais.Interfaces;

namespace Calais
{
    public class CalaisMicroFormatsDocument : ICalaisDocument
    {
        #region ICalaisDocument Members

        public string RawOutput { get; set;}

        public void ProcessResponse(string response)
        {
            RawOutput = response;

            //Check for web service error.
            if (response.Contains("</Exception></Error>"))
            {
                throw new CalaisWebServiceException(XDocument.Parse(response));
            }
        }

        #endregion
    }
}